package cn.wolfcode.mq._03_message_model;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        consumerGroup = "boot-consumer-demo",
        topic = "01_hello",
//        messageModel = MessageModel.CLUSTERING
        messageModel = MessageModel.BROADCASTING
)
public class ConsumerOne implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("ConsumerOne消费的消息:"+s);
    }
}
